#include <functional>
#include <memory>
#include <iostream>
#include <typeinfo>

class A {
public:
    void fun_3(int k,int m) {
        std::cout << "print: k = "<< k << ", m = " << m << std::endl;
    }
};

void funcc(int k, int m)
{

}

int main()
{
    A a;
    //f5的类型为 function<void(int, int)>
    auto f5 = std::bind(&A::fun_3, &a, std::placeholders::_1, std::placeholders::_2); //使用auto关键字
    // std::cout << typeid(f5).name() << std::endl;
    f5(10, 20);
    std::cout << typeid(funcc).name() << std::endl;

    return 0;
}